\hypertarget{group__wickr__array}{}\section{wickr\+\_\+array\+\_\+t}
\label{group__wickr__array}\index{wickr\_array\_t@{wickr\_array\_t}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
wickr\+\_\+array\+\_\+t $\ast$ \mbox{\hyperlink{group__wickr__array_gad5842105c20b42cc4b5b4ffc2a72556b}{wickr\+\_\+array\+\_\+new}} (uint32\+\_\+t item\+\_\+count, uint8\+\_\+t item\+\_\+type, wickr\+\_\+array\+\_\+copy\+\_\+func item\+\_\+copy\+\_\+func, wickr\+\_\+array\+\_\+destroy\+\_\+func item\+\_\+destroy\+\_\+func)
\item 
uint32\+\_\+t \mbox{\hyperlink{group__wickr__array_gafe1191ce494529dbfd5240a84bcba5a2}{wickr\+\_\+array\+\_\+get\+\_\+item\+\_\+count}} (const wickr\+\_\+array\+\_\+t $\ast$array)
\item 
bool \mbox{\hyperlink{group__wickr__array_ga3b3c15b3c6a15f52d20c678b6829ee21}{wickr\+\_\+array\+\_\+set\+\_\+item}} (wickr\+\_\+array\+\_\+t $\ast$array, uint32\+\_\+t index, void $\ast$item, bool copy)
\item 
void $\ast$ \mbox{\hyperlink{group__wickr__array_ga3a6dd3ee6295f6230e2047584a261774}{wickr\+\_\+array\+\_\+fetch\+\_\+item}} (const wickr\+\_\+array\+\_\+t $\ast$array, uint32\+\_\+t index, bool copy)
\item 
wickr\+\_\+array\+\_\+t $\ast$ \mbox{\hyperlink{group__wickr__array_ga1e28a815bd4310985e493b67f66f26c7}{wickr\+\_\+array\+\_\+copy}} (const wickr\+\_\+array\+\_\+t $\ast$array, bool deep\+\_\+copy)
\item 
void \mbox{\hyperlink{group__wickr__array_ga984338e0a278ef1b23aca7330f0bfcc3}{wickr\+\_\+array\+\_\+destroy}} (wickr\+\_\+array\+\_\+t $\ast$$\ast$array, bool destroy\+\_\+items)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__wickr__array_ga1e28a815bd4310985e493b67f66f26c7}\label{group__wickr__array_ga1e28a815bd4310985e493b67f66f26c7}} 
\index{wickr\_array\_t@{wickr\_array\_t}!wickr\_array\_copy@{wickr\_array\_copy}}
\index{wickr\_array\_copy@{wickr\_array\_copy}!wickr\_array\_t@{wickr\_array\_t}}
\subsubsection{\texorpdfstring{wickr\_array\_copy()}{wickr\_array\_copy()}}
{\footnotesize\ttfamily wickr\+\_\+array\+\_\+t$\ast$ wickr\+\_\+array\+\_\+copy (\begin{DoxyParamCaption}\item[{const wickr\+\_\+array\+\_\+t $\ast$}]{array,  }\item[{bool}]{deep\+\_\+copy }\end{DoxyParamCaption})}

Make a copy


\begin{DoxyParams}{Parameters}
{\em array} & the array that is being copied \\
\hline
{\em deep\+\_\+copy} & if true, items inserted into the copied array will be a deep copy of items in the original array. If false, items in the original array will be inserted into the new array without transferring ownership \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a copy of the array, or N\+U\+LL if either allocating the copied array fails, or the deep\+\_\+copy flag is set, and the copy operation fails on one of the items in the source array 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__array_ga984338e0a278ef1b23aca7330f0bfcc3}\label{group__wickr__array_ga984338e0a278ef1b23aca7330f0bfcc3}} 
\index{wickr\_array\_t@{wickr\_array\_t}!wickr\_array\_destroy@{wickr\_array\_destroy}}
\index{wickr\_array\_destroy@{wickr\_array\_destroy}!wickr\_array\_t@{wickr\_array\_t}}
\subsubsection{\texorpdfstring{wickr\_array\_destroy()}{wickr\_array\_destroy()}}
{\footnotesize\ttfamily void wickr\+\_\+array\+\_\+destroy (\begin{DoxyParamCaption}\item[{wickr\+\_\+array\+\_\+t $\ast$$\ast$}]{array,  }\item[{bool}]{destroy\+\_\+items }\end{DoxyParamCaption})}

Free an array


\begin{DoxyParams}{Parameters}
{\em array} & the array to destroy \\
\hline
{\em destroy\+\_\+items} & if true, the destroy function specified in \textquotesingle{}wickr\+\_\+array\+\_\+create\textquotesingle{} will be called on each item in the array before destroying the array itself \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__wickr__array_ga3a6dd3ee6295f6230e2047584a261774}\label{group__wickr__array_ga3a6dd3ee6295f6230e2047584a261774}} 
\index{wickr\_array\_t@{wickr\_array\_t}!wickr\_array\_fetch\_item@{wickr\_array\_fetch\_item}}
\index{wickr\_array\_fetch\_item@{wickr\_array\_fetch\_item}!wickr\_array\_t@{wickr\_array\_t}}
\subsubsection{\texorpdfstring{wickr\_array\_fetch\_item()}{wickr\_array\_fetch\_item()}}
{\footnotesize\ttfamily void$\ast$ wickr\+\_\+array\+\_\+fetch\+\_\+item (\begin{DoxyParamCaption}\item[{const wickr\+\_\+array\+\_\+t $\ast$}]{array,  }\item[{uint32\+\_\+t}]{index,  }\item[{bool}]{copy }\end{DoxyParamCaption})}

Fetch an item at a specified index


\begin{DoxyParams}{Parameters}
{\em array} & the array from which an item will be fetched \\
\hline
{\em index} & the position in the array the item will be fetched from \\
\hline
{\em copy} & if true, a deep copy will be made and returned instead of the item stored in the array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the item in the array at position \textquotesingle{}index\textquotesingle{}. N\+U\+LL is returned if the index is not within the bounds of the array, if the item at position \textquotesingle{}index\textquotesingle{} is N\+U\+LL because it was never set with \textquotesingle{}wickr\+\_\+array\+\_\+set\+\_\+item\textquotesingle{}, or because copy was true and the copy operation failed 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__array_gafe1191ce494529dbfd5240a84bcba5a2}\label{group__wickr__array_gafe1191ce494529dbfd5240a84bcba5a2}} 
\index{wickr\_array\_t@{wickr\_array\_t}!wickr\_array\_get\_item\_count@{wickr\_array\_get\_item\_count}}
\index{wickr\_array\_get\_item\_count@{wickr\_array\_get\_item\_count}!wickr\_array\_t@{wickr\_array\_t}}
\subsubsection{\texorpdfstring{wickr\_array\_get\_item\_count()}{wickr\_array\_get\_item\_count()}}
{\footnotesize\ttfamily uint32\+\_\+t wickr\+\_\+array\+\_\+get\+\_\+item\+\_\+count (\begin{DoxyParamCaption}\item[{const wickr\+\_\+array\+\_\+t $\ast$}]{array }\end{DoxyParamCaption})}

Fetch the size of the array

Note that null values in the array, or uninitialized values in the array will still be counted. The size of the array remains static after it has been created with wickr\+\_\+array\+\_\+new. Increasing or decreasing the size of the array is not yet supported


\begin{DoxyParams}{Parameters}
{\em array} & an array to get the item count of \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of items contained in the array 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__array_gad5842105c20b42cc4b5b4ffc2a72556b}\label{group__wickr__array_gad5842105c20b42cc4b5b4ffc2a72556b}} 
\index{wickr\_array\_t@{wickr\_array\_t}!wickr\_array\_new@{wickr\_array\_new}}
\index{wickr\_array\_new@{wickr\_array\_new}!wickr\_array\_t@{wickr\_array\_t}}
\subsubsection{\texorpdfstring{wickr\_array\_new()}{wickr\_array\_new()}}
{\footnotesize\ttfamily wickr\+\_\+array\+\_\+t$\ast$ wickr\+\_\+array\+\_\+new (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{item\+\_\+count,  }\item[{uint8\+\_\+t}]{item\+\_\+type,  }\item[{wickr\+\_\+array\+\_\+copy\+\_\+func}]{item\+\_\+copy\+\_\+func,  }\item[{wickr\+\_\+array\+\_\+destroy\+\_\+func}]{item\+\_\+destroy\+\_\+func }\end{DoxyParamCaption})}

Create a new array


\begin{DoxyParams}{Parameters}
{\em item\+\_\+count} & number of items the array will hold \\
\hline
{\em item\+\_\+type} & an integer that will designate the type of item the array will hold. All items in the array must be of the same type \\
\hline
{\em item\+\_\+copy\+\_\+func} & a function that will provide a deep copy of an item in the array \\
\hline
{\em item\+\_\+destroy\+\_\+func} & a function that will provide freeing memory consumed by an item in the array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated array 
\end{DoxyReturn}
\mbox{\Hypertarget{group__wickr__array_ga3b3c15b3c6a15f52d20c678b6829ee21}\label{group__wickr__array_ga3b3c15b3c6a15f52d20c678b6829ee21}} 
\index{wickr\_array\_t@{wickr\_array\_t}!wickr\_array\_set\_item@{wickr\_array\_set\_item}}
\index{wickr\_array\_set\_item@{wickr\_array\_set\_item}!wickr\_array\_t@{wickr\_array\_t}}
\subsubsection{\texorpdfstring{wickr\_array\_set\_item()}{wickr\_array\_set\_item()}}
{\footnotesize\ttfamily bool wickr\+\_\+array\+\_\+set\+\_\+item (\begin{DoxyParamCaption}\item[{wickr\+\_\+array\+\_\+t $\ast$}]{array,  }\item[{uint32\+\_\+t}]{index,  }\item[{void $\ast$}]{item,  }\item[{bool}]{copy }\end{DoxyParamCaption})}

Assign an item to a specified index in the array


\begin{DoxyParams}{Parameters}
{\em array} & the array the item is being set into \\
\hline
{\em index} & the position in the array the item is being set into \\
\hline
{\em item} & the item that will be set in the array at the specified index \\
\hline
{\em copy} & if true, a deep copy of the item will be made, and the copy will be inserted into the array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if the index is within the bounds of the array, and item points to a valid pointer, will return false if copy is set and the copy operation fails 
\end{DoxyReturn}
